package com.leunpha.mini.spider.listener;

import com.leunpha.mini.net.events.NetEvent;
import com.leunpha.mini.net.events.NetState;
import com.leunpha.mini.net.listener.Listener;

/**
 * User: zhoujingjie
 * Date: 14-6-30
 * Time: 下午5:07
 */
public abstract class SpiderSuccessListener<T> extends Listener {
    @Override
    public void update(NetEvent event) {
        if(event.getState() == NetState.SUCCESS)
            success((T) event.getValue());
    }

    public abstract void success(T bean);
}
